#ifndef __SERIAL_H__
#define __SERIAL_H__

#include <memory>
#include "SerialPort.h"
#include "SerialStream.h"
#include <iostream>
#include <string>
#include <cmath>

class serial_ctl
{
public:
    serial_ctl(const std::string& port_name);
    
    ~serial_ctl();
    
    serial_ctl(void) = delete;

    void serial_init(void);

    void serial_close(void);

    void send_cmd(float forward, float yaw);

    void send_reset(void);

    void get_protocol_version(void);

private:
    std::string port_name_;
    std::shared_ptr<SerialPort>   serial_port_;
    int protocol_version_ = 0;
};





#endif